function hnooi (num,T1,T2,T3){
    if(num === 1){
        console.log(T1+"移动至"+T3)
    }else{
        hnooi(num-1,T1,T3,T2)
        console.log(T1+"移动至"+T3) 
        hnooi(num-1,T2,T1,T3)
    }
}
hnooi(4,"塔1","塔2","塔3")